package com.wzg.mmkv;

import android.app.Application;

import com.wzg.logrlibrary.LogR;
import com.wzg.sputils.SPUtil;

public class APP extends Application {
    private static final String cryptKey = "s1d#f%sdf@sd!fs";


    private static  MMKVUtil  mmkvUtil=null;

    @Override
    public void onCreate() {
        super.onCreate();
        //LogR
        LogR.getInstance()
                .setTAG("mmkvUtil")
                .setLogI(true)
                .setLogE(true)
                .setDateFormatType(LogR.DATE_TYPE_A);

        //mmkv
        mmkvUtil=  MMKVUtil.getInstance();
        mmkvUtil .init(this);
        mmkvUtil.setEncrypt(true, cryptKey);

        //spUtil
        SPUtil.init(this);

    }

    public static MMKVUtil getMmkvUtil() {
        return mmkvUtil;
    }
}
